package com.zznzzn.myweb.mapper;

import com.zznzzn.myweb.pojo.Record;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface ChatMapper {
    public int addChatRec(Record record);
    public List<Record> queryRecordsBetweenUuidBylimit(@Param("fromid")String fromid,@Param("toid")String toid,@Param("limit")int limit);
    public List<Record> queryRecordsBetweenUuidAfterTime(@Param("fromid")String fromid, @Param("toid")String toid,@Param("time") Date time);
    public List<Record> queryRecordsBetweenUuidAfterTimeByLimit(@Param("fromid")String fromid,@Param("toid") String toid,@Param("time") Date time,@Param("limit")int limit);
    public List<Record> queryRecordsBetweenUuid(@Param("fromid") String fromid, @Param("toid") String toid);
    public List<Record> queryRecordsOfUuid(@Param("fromid") String fromid,@Param("limit") int limit);
//    public int deleteRecordsBetweenUuid(String fromid,String toid);
    public int setReceived(@Param("fromid") String fromid,@Param("toid") String toid);
}
